﻿using Appliaction.Dto.Base_Manage;
using Domain.Entitys.Base_Manage;
using EFCore.Repositorys.Base_Manage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Appliaction.IAppServices.Base_Manage
{
    public interface IUserService
    {
        Task<Sys_User> LoginAsync(Sys_User user);

        /// <summary>
        /// 查询全部用户
        /// </summary>
        /// <returns></returns>
        Task<List<Sys_User>> GetUsersAsync(int dept, string name);

        /// <summary>
        /// 根据用户名和部门分页查询用户信息
        /// </summary>
        /// <param name="name"></param>
        /// <param name="dept_id"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<List<Sys_User>> GetSys_UsersAsync(string name, int dept_id, int currentPage, int pageSize);

        /// <summary>
        /// 根据用户名和部门查询用户总数
        /// </summary>
        /// <param name="name"></param>
        /// <param name="dept_id"></param>
        /// <returns></returns>
        Task<int> GetSys_UsersCountAsync(string name, int dept_id);

        /// <summary>
        /// 添加用户信息
        /// </summary>
        /// <param name="sys_User"></param>
        /// <returns></returns>
        Task<int> Sys_UserAddAsync(UserAddDto userAddDto);

        /// <summary>
        /// 修改用户信息
        /// </summary>
        /// <param name="sys_User"></param>
        /// <returns></returns>
        Task<int> Sys_UserUpdateAsync(UserUpdateDto userUpdateDto);

        /// 逻辑删除用户信息
        /// </summary>
        /// <param name="sys_User"></param>
        /// <returns></returns>
        Task<int> Sys_UserDeleteAsync(UserDeleteDto userDeleteDto);
    }
}
